﻿namespace EFML_Runtime.Internal
{
    using System.Collections.Generic;
    using System.Xml;

    public class StringParser
    {
        #region Fields

        public Dictionary<string, string> Strings = new Dictionary<string, string>();

        #endregion

        #region Public Methods and Operators

        public void Load(string src)
        {
            var doc = new XmlDocument();
            doc.LoadXml(src);

            foreach (XmlNode c in doc.GetElementsByTagName("strings")[0].ChildNodes)
            {
                this.Strings.Add(c.Attributes["name"].Value, c.Attributes["value"].Value);
            }
        }

        #endregion
    }
}